home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 120
/
Vol 120.iso
/
games
/
bounce_c.swf
/
scripts
/
frame_50
/
DoAction.as
Wrap
Text File
|
2010-11-09
|
4KB
|
143 lines
stop();
removeAllClips();
_root.onEnterFrame = function()
{
back3._x = -440 + _xmouse / 1.5;
back2._x = -300 + _xmouse / 4;
back1._x = -230 + _xmouse / 8;
};
master_score = 0;
var c = 1;
while(c <= 5)
{
master_score += _root["stage_score" + c];
c++;
}
master_rank = master_score / 5;
if(_root.master_rank > _root.score_level1)
{
overall_rank.crush_rank.gotoAndStop("r_m");
}
else if(_root.master_rank > _root.score_level2)
{
overall_rank.crush_rank.gotoAndStop("r_a");
}
else if(_root.master_rank > _root.score_level3)
{
overall_rank.crush_rank.gotoAndStop("r_b");
}
else if(_root.master_rank > _root.score_level4)
{
overall_rank.crush_rank.gotoAndStop("r_c");
}
else if(_root.master_rank > _root.score_level5)
{
overall_rank.crush_rank.gotoAndStop("r_d");
}
else if(_root.master_rank > _root.score_level6)
{
overall_rank.crush_rank.gotoAndStop("r_e");
}
else if(_root.master_rank > 0)
{
overall_rank.crush_rank.gotoAndStop("r_f");
}
else
{
overall_rank.crush_rank.gotoAndStop("r_n");
}
menuButton.onRollOver = function()
{
this._xscale = 120;
this._yscale = 120;
};
menuButton.onRollOut = function()
{
this._xscale = 100;
this._yscale = 100;
};
menuButton.onPress = function()
{
_root.gotoAndStop("menuScreen");
};
var i = 1;
while(i <= 5)
{
_root["levelSelect" + i].j = i;
_root["levelSelect" + i]._xscale = 9;
_root["levelSelect" + i]._yscale = 9;
_root["levelSelect" + i].lineMap.gotoAndStop(i);
_root["levelSelect" + i].houseMap.gotoAndStop(i);
_root["levelSelect" + i].caveBackground._alpha = 100;
if(_root["stage_score" + (i - 1)] > 0 || i == 1)
{
_root["levelSelect" + i].black_mask._alpha = 0;
}
else
{
_root["levelSelect" + i].black_mask._alpha = 50;
}
_root["levelSelect" + i].onPress = function()
{
if(_root["stage_score" + (this.j - 1)] > 0 || this.j == 1)
{
_root.currentLevel = this.j;
_root.gotoAndStop("levelStart");
}
};
_root["levelSelect" + i].onRollOver = function()
{
this.play();
this._xscale = 10;
this._yscale = 10;
if(_root["stage_score" + this.j] > 0 || this.j == 1)
{
_root.stage_score = _root["stage_score" + this.j];
_root.stage_select.gotoAndStop("stage_detail");
if(_root.stage_score > _root.score_level1)
{
_root.stage_select.crush_rank.gotoAndStop("r_m");
}
else if(_root.stage_score > _root.score_level2)
{
_root.stage_select.crush_rank.gotoAndStop("r_a");
}
else if(_root.stage_score > _root.score_level3)
{
_root.stage_select.crush_rank.gotoAndStop("r_b");
}
else if(_root.stage_score > _root.score_level4)
{
_root.stage_select.crush_rank.gotoAndStop("r_c");
}
else if(_root.stage_score > _root.score_level5)
{
_root.stage_select.crush_rank.gotoAndStop("r_d");
}
else if(_root.stage_score > _root.score_level6)
{
_root.stage_select.crush_rank.gotoAndStop("r_e");
}
else
{
_root.stage_select.crush_rank.gotoAndStop("r_f");
}
}
else if(_root["stage_score" + (this.j - 1)] > 0 || this.j == 1)
{
_root.stage_select.gotoAndStop("stage_click");
}
else
{
_root.stage_select.gotoAndStop("stage_locked");
}
};
_root["levelSelect" + i].onRollOut = function()
{
this._xscale = 9;
this._yscale = 9;
_root.stage_select.gotoAndStop("stage_roll");
};
i += 1;
}